<?php
class plugin
{
	var $ipsclass;
	
	function auto_run()
	{
		if(!is_array($this->ipsclass->cache['market_plugin'][$this->ipsclass->input['plugin']]))
		{
			$this->ipsclass->boink_it($this->ipsclass->market_class->base_url);
		}
		
		if(!in_array($this->ipsclass->member['mgroup'],$this->ipsclass->cache['market_plugin'][$this->ipsclass->input['plugin']]['view_permission']))
		{
			$this->ipsclass->boink_it($this->ipsclass->market_class->base_url);
		}
		
		$plugin = $this->ipsclass->market_class->load_plugin($this->ipsclass->cache['market_plugin'][$this->ipsclass->input['plugin']]);
		$plugin->run();
	}
}
?>